/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.ivanbiz.quiz;

import java.util.List;

/**
 *
 * @author User
 */
public class TitleQuizServiceImpl implements TitleQuizService {
    
    private TitleQuizDAO titleQuizDAO;

    public void setTitleQuizDAO(TitleQuizDAO titleQuizDAO) {
        this.titleQuizDAO = titleQuizDAO;
    }
     public void saveTitleQuiz(TitleQuiz titleQuiz) throws Exception {
        this.titleQuizDAO.save(titleQuiz);
    }

    public void deleteTitleQuiz(TitleQuiz titleQuiz) throws Exception {
        this.titleQuizDAO.delete(titleQuiz);
    }

    public void updateTitleQuiz(TitleQuiz titleQuiz) throws Exception {
        this.titleQuizDAO.update(titleQuiz);
    }

    public List loadAll() throws Exception {
        return this.titleQuizDAO.getAll(TitleQuiz.class);
    }

    public TitleQuiz loadById(long id) throws Exception {
        return (TitleQuiz) this.titleQuizDAO.load(TitleQuiz.class, id);
    }

    public List getTitleQuizByKelas(long idKelas) throws Exception {
        return this.titleQuizDAO.getTitleQuizByKelas(idKelas);
    }
}
